/* eslint-disable */
/* 开源共享项目 itsoft-2021*/ 
import Vue from 'vue'
import App from './App'
import router from './router'
/*vuex*/
import store from './store'
import {
  getConfig
} from '@/api/config'
/*ElementUI*/
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
/*加载公用样式表*/
import "@/assets/base.css";
/*加载elementUI自定义样式表*/
import "@/assets/eleUIcustom.scss";
Vue.config.productionTip = false
Vue.use(ElementUI)
/*加载itsfotUI自定义*/
import itsoftUI from "@/itsoftUI/index";



//获取config 发布文件夹下config.json
getConfig().then(res => {
  //配置文件验证
  if (typeof (res.serviceUrl) === 'undefined') {
      Message({
          showClose: true,
          message: "请检查系统配置文件(config.json)",
          type: 'error',
          duration: 0
      });
      console.log("请检查系统配置文件(config.json)")
      return
  }
  //初始化通用类库itsoftUI
  Vue.use(itsoftUI, router)
  //服务接口地址
  Vue.prototype.$itsoftUI.config.serviceUrl = res.serviceUrl
  //资源库ID
  Vue.prototype.$repositoryId=1
  createdVue()
  

})

function createdVue() {

  new Vue({
      router,
      store,
      render: h => h(App),
  }).$mount('#app')
}
